<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for-table</title>


</head>
<body>
<div id="app">

   <table style="width: 100%">
       <thead>
           <tr>
               <th>序号</th>
               <th>学生姓名</th>
               <th>编号</th>
               <th>专业</th>
           </tr>
       </thead>
       <tbody>
           <tr v-for="(stu,index) in students">
               <td>{{index+1}}</td>
                   <td v-for="(inner,innerKey) in stu">
                        <template v-if="innerKey!='id'">
                             {{inner}}
                        </template>
                   </td>
<!--               <td>{{stu.name}}</td>-->
<!--               <td>{{stu.stuNO}}</td>-->
<!--               <td>{{stu.major}}</td>-->
           </tr>
       </tbody>
   </table>
</div>


</body>
<script src="../mock/db.js"></script>
<script src="../../lib/vue.global.js"></script>

<script>

   var app=  Vue.createApp({
         data:function (){

             return {
                  students:students
             }
         }
     });

   app.mount('#app');

</script>

</html>